package com.cartoon.controller;

import com.cartoon.entity.User;
import com.cartoon.service.UserService;
import com.cartoon.util.ResponseData;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * (User)表控制层
 *
 * @author makejava
 * @since 2021-12-10 11:28:09
 */
@RestController
@RequestMapping("user")
public class UserController {
    /**
     * 服务对象
     */
    @Resource
    private UserService userService;
     @GetMapping("insertIntoUserInfo")//插入用户数据
     public ResponseData insertIntoUserInfo(String userName,String headPicture){
         return userService.insertIntoUserInfo(userName,headPicture);
     }
     @GetMapping("getUserById")
     public ResponseData getUserById(int userId){
         return userService.getUserById(userId);
     }
     @GetMapping("isExistUser")
     public ResponseData isExistUser(String userName,String password){
         return userService.isExistUser(userName,password);
     }
}

